import com.dmotiko.sathya.*
import com.dmotiko.general.*
import com.dmotiko.util.*

class PrensaThumb
extends MovieLoaderClip {
	
	private var interpolate;
	private var interpolator;
	
	function PrensaThumb(){
		super();
		MovieEffects.fadeIn();
	}
	
	public function setData(data:Object){
		super.setData(data);
		loadContent(data.icon);
	}
	
	public function onLoadInit(target:MovieClip){
		super.onLoadInit();
		target._alpha = 0;
		target._x = 1;
		target._y = 1;
	}
	
	public function show(){
		mcContainer.fadeIn();
	}
	
	public function onRollOver(){
		MovieEffects.interpolate();
		interpolator.stopInterpolation();
		interpolator = interpolate( { prop: "_alpha", init: this._alpha, end: 60, ratio: 4 } );
	}
	
	public function onRollOut(){
		MovieEffects.interpolate();
		interpolator.stopInterpolation();
		interpolator = interpolate( { prop: "_alpha", init: this._alpha, end: 100, ratio: 4 } );
	}
	
	public function onRelease(){
		dispatchEvent( { target: this, type: "onRelease", data: this.data } );
	}
	
}